var lastFrameUrl;
//@Bind view.onCreate
!function (self, arg) {
    var fireurltree = function () {
        var url;
        var tree = view.id("dataTreeUrl");
        var currentEntity = tree.get("currentEntity");
        url = currentEntity.get("url");
        if (url != null && "null" != url && "" != url) {
            view.set("#frameMain.path", url);
            lastFrameUrl = url;
        } else {
            var currentNode = tree.get("currentNode");
            if (currentNode.get("expanded")) {
                currentNode.collapse();
            } else {
                currentNode.expand();
            }

        }
    };
}
//@Bind #dataTreeUrl.onClick
!function (self, arg) {
    var url;
    var tree = this.id("dataTreeUrl");
    var currentEntity = tree.get("currentEntity");
    url = currentEntity.get("url");
    if (url != null && "null" != url && "" != url) {
        view.set("#frameMain.path", url);
        lastFrameUrl = url;
    } else {
        var currentNode = tree.get("currentNode");
        if (currentNode.get("expanded")) {
            currentNode.collapse();
        } else {
            currentNode.expand();
        }

    }
}
//@Bind #dataTreeUrl.onDoubleClick
!function (self, arg) {
    var url;
    var tree = this.id("dataTreeUrl");
    var currentEntity = tree.get("currentEntity");
    url = currentEntity.get("url");
    if (url != null && "null" != url && "" != url) {
        view.set("#frameMain.path", url);
        lastFrameUrl = url;
    } else {
        var currentNode = tree.get("currentNode");
        if (currentNode.get("expanded")) {
            currentNode.collapse();
        } else {
            currentNode.expand();
        }

    }
}
//@Bind #frameMain.onReady
!function (self, arg) {
    var path = '${configure.getString("ling2.mainFrame.welcomePath")}';
    self.set("path", path);
}